<nav aria-label="...">
    <ul class="pager">
        <li class="previous paging" data-page="{{page-1}}" data-pages="{{pages}}"><a href="javascript:;"><span aria-hidden="true">&larr;</span> 上一页</a></li>
        <li>
            一共{{count}}条数据，每页显示{{limit}}条，一共{{pages}}页，当前第{{page}}页
        </li>
        <li class="next paging" data-page="{{page+1}}" data-pages="{{pages}}"><a href="javascript:;">下一页<span aria-hidden="true">&rarr;</span></a></li>
    </ul>
    <script>
        $(function () {


            $(".paging").on("click",function () {
                var page = $(this).attr("data-page");
                var pages = $(this).attr("data-pages");
                console.log( pages)
                if(page<=0){
                    alert("已是第一页！")
                    return;
                }
                if(page>pages){
                    alert("已是最后一页！")
                    return
                };
                window.location.href="/admin/user?page="+page;


            })
        })
    </script>
</nav>